package com.radiant.data.entity;

import java.util.Date;

import javax.xml.bind.annotation.XmlRootElement;

import com.radiant.data.annotation.Entity;
import com.radiant.data.annotation.Persist;

/**
 * Represents an item in a person's activity feed. The activity feed item holds a reference to the 
 * {@link WallEntity} object that should be rendered on the person's activity feed page. 
 * @author karthikk
 *
 */
@XmlRootElement
@Entity(name="Activity")
public class Activity {

	public enum Type {
		POST, COMMENT, LIKE, MILESTONE, MEASUREMENT
	}

	@Persist(name="activityId", itemName=true)
	private String activityId;

	@Persist(name="userName")
	private String userName;
	
	@Persist(name="creator")
	private String creator;

	@Persist(name="message")
	private String message;

	@Persist(name="post", complex=true)
	private Post post;

	@Persist(name="milestone", complex=true)
	private Milestone milestone;

	@Persist(name="measurement", complex=true)
	private Measurement measurement;

	@Persist(name="type")
	private Type type;

	@Persist(name="timeCreated")
	private Date timeCreated;

	public String getActivityId() {
		return activityId;
	}

	public void setActivityId(String activityId) {
		this.activityId = activityId;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Post getPost() {
		return post;
	}

	public void setPost(Post post) {
		this.post = post;
	}

	public Type getType() {
		return type;
	}

	public void setType(Type type) {
		this.type = type;
	}

	public Milestone getMilestone() {
		return milestone;
	}

	public void setMilestone(Milestone milestone) {
		this.milestone = milestone;
	}
	
	public Measurement getMeasurement() {
		return measurement;
	}

	public void setMeasurement(Measurement measurement) {
		this.measurement = measurement;
	}

	public Date getTimeCreated() {
		return timeCreated;
	}

	public void setTimeCreated(Date timeCreated) {
		this.timeCreated = timeCreated;
	}

}
